package com.md.Lession10;

import java.util.Scanner;

public class Dome4 {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int n=scanner.nextInt();
		int a=1;
		int sum=0;
		for (int i = 1; i <=n ; i++) {
			a=a*i;
			sum=sum+a;
		}
		System.out.println(sum);
	}

}
